a,b=map(int,input().split(" "))
c,d=map(int,input().split(" "))
print(f'{a}%{b}={a%b}')
print(f'{c}%{d}={c%d}')